import 'package:flutter/material.dart';
import 'package:flutter_navigator/OSNavigator/OSNavigator.dart';

class AMLoginPage extends StatefulWidget {
  const AMLoginPage({Key? key}) : super(key: key);

  @override
  _AMLoginPageState createState() => _AMLoginPageState();
}

class _AMLoginPageState extends State<AMLoginPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("登录页面")),
      body: Container(
        color: Colors.orange,
        child: Center(
          child: Column(
            children: [
              SizedBox(
                height: 30,
              ),
              MaterialButton(
                  color: Colors.pinkAccent,
                  child: Text("去注册"),
                  onPressed: () {
                    OSNavigator.getInstance().onJumpTo(RouteStatus.regist);
                  }),
              SizedBox(
                height: 30,
              ),
              MaterialButton(
                color: Colors.cyanAccent,
                child: Text("登录按钮"),
                onPressed: () {
                  OSNavigator.getInstance()
                      .onJumpTo(RouteStatus.home, args: {"isLogin": true});
                },
              )
            ],
          ),
        ),
      ),
    );
  }
}
